package manage.service.impl;

import manage.dao.PositionMapper;
import manage.model.Position;
import manage.model.Record;
import manage.service.PoitionServcie;
import manage.util.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: create by  Raphaelkxy
 * @version: v1.0
 * @description: manage.service.impl
 * @date:2019/8/28
 */
@Service
public class PositionServcieImp implements PoitionServcie {

    @Autowired
    private PositionMapper positionMapper;


    @Override
    public List<Position> getAll() {
        return positionMapper.getAll();
    }

    @Override
    public int insertrecord(Position record) {
        return positionMapper.insert(record);
    }

    @Override
    public int deleteByPrimaryKey(int id) {
        return positionMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKey(Position position) {
        return positionMapper.updateByPrimaryKey(position);
    }

    public Position getById(Integer pid) {
        return positionMapper.selectByPrimaryKey(pid);
    }

    @Override
    public List<Position> getByfabu() {
        return positionMapper.getByFabu();
    }

    @Override
    public List<Position> getByshenhe() {
        return positionMapper.getByshenhe();
    }

    @Override
    public List<Position> getByfabu0() {
        return positionMapper.getByFabu0();
    }

    @Override
    public List<Position> getByshenhe0() {
        return positionMapper.getByshenhe0();
    }

    public int deleteByPrimaryKey(String username) {
        return 0;
    }




    public int insertRecord(Position record) {
        return positionMapper.insert(record) ;
    }

    public int insertSelective(Position record) {
        return positionMapper.insertSelective(record);
    }

    public Position selectByPrimaryKey(int id) {
        return positionMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Position record) {
        return positionMapper.updateByPrimaryKeySelective(record);
    }




}
